The Accordion Pane Component > FAccordionPane.getSelectedIndex() |
FAccordionPane.getSelectedIndex()
Availability
Flash Player 6.
Usage
myAccordion_acp.getSelectedIndex ()
Parameters
none
Returns
Returns a number indicating the index of the currently selected / open section
of the component.
Description
Returns a number indicating the index of the currently selected / open section of the component.
Example
The following code adds four sections to the component, sets the selected index 2, and then retrieves information from the currently selected section.
var sections = ["Section 1","Section 2","Section 3","Section 4"];
myAccordionPane_acp.setDataProvider(sections);
myAccordionPane_acp.setSelectedIndex(2);
var index = myAccordionPane_acp.getSelectedIndex();
trace("Index: "+index); //traces "Index: 2"
See also
FAccordionPane.setSelectedIndex()